package com.zlm.String;

import java.util.Objects;

/**
 * @author 13026
 */ // alt + ins 自动生成javabean
public class People {
    private String name;
    private Number age;


    public People() {
    }

    public People(String name, Number age) {
        this.name = name;
        this.age = age;
    }

    /**
     * 获取
     *
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     *
     * @param name 名字
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     *
     * @return age
     */
    public Number getAge() {
        return age;
    }

    /**
     * 设置
     *
     * @param age 年龄
     */
    public void setAge(Number age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "People{name = " + name + ", age = " + age + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        People people = (People) o;
        return Objects.equals(name, people.name) && Objects.equals(age, people.age);
    }
}
